//
//  DBManager.h
//  BobNews
//
//  Created by lanou3g on 16/5/11.
//  Copyright © 2016年 liu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ToutiaoModel.h"
#import "BaseModel.h"
@interface DBManager : NSObject

/// 单例
+ (instancetype)shareManager;

/// 打开数据库
- (void)openDB;

/// 创建表
- (void)createTable;

/// 插入数据
- (void)insertModel:(ToutiaoModel *)model html:(NSString *)htmlStr;

/// 收藏
- (void)collectionModel:(ToutiaoModel *)model html:(NSString *)htmlStr;
- (void)colletModel:(BaseModel *)model html:(NSString *)htmlStr;
/// 取消收藏
- (void)cancelCollectionArtical:(NSString *)docid;

/// 查询所有收藏的内容
- (NSArray *)selectAllCollection;

/// 判断是否收藏过
- (BOOL)hasCollectionDocid:(NSString *)docid;

@end
